<%@page import="com.fw.payment.util.RequestUtil"%>
<%@page import="org.apache.commons.lang.RandomStringUtils"%>
<%@page import="java.math.BigInteger"%>
<%@page import="java.security.SecureRandom"%>
<%@page contentType="text/html;charset=UTF-8"%>
<%@page pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Simulate - EC</title>
<meta name="Generator" content="EditPlus">
<meta name="Author" content="">
<meta name="Keywords" content="">
<meta name="Description" content="">
<style>
input[type="text"] {
	width: 100%;
}

.red {
	color: red;
}
</style>
</head>
<body>
	<center>
		<h1>Simulate</h1>
	</center>
	<form action="${pageContext.request.contextPath}/payment/cash"
		method="POST">
		<table width="80%" align="center">
			<tr>
				<td align="center"><input type="submit" value="submit" /></td>
			</tr>
			<tr>
				<td align="left">
					<p>
						serviceID * <input type="text" id="serviceID" name="serviceID"
							value="<%=RandomStringUtils.randomAlphabetic(15)%>" />
					</p>
					<p>
						merchantID * <input type="text" id="merchantID" name="merchantID"
							value="<%=RandomStringUtils.randomAlphabetic(11)%>" />
					</p>

					<p>
						invoiceNo * <input type="text" id="invoiceNo" name="invoiceNo"
							value="<%=RandomStringUtils.randomAlphabetic(19)%>" />
					</p>
					<p>
						productDesc <input type="text" id="productDesc" name="productDesc"
							value="<%=RandomStringUtils.randomAlphabetic(50)%>" />
					</p>
					<p>
						amount * <input type="text" id="amount" name="amount"
							value="<%=RandomStringUtils.randomNumeric(12)%>" />
					</p>
					<p>
						currencyCode * <input type="text" id="currencyCode"
							name="currencyCode" value="764" />
					</p>
					<p>
						language * <input type="text" id="language" name="language"
							value="TH" />
					</p>

					<p>
						customerName <input type="text" id="customerName"
							name="customerName"
							value="<%=RandomStringUtils.randomAlphabetic(100)%>" />
					</p>
					<p>
						customerEmail <input type="text" id="customerEmail"
							name="customerEmail"
							value="<%=RandomStringUtils.randomAlphabetic(20) + "@gmail.com"%>" />
					</p>
					<p>
						customerPhone <input type="text" id="customerPhone"
							name="customerPhone"
							value="<%=RandomStringUtils.randomNumeric(20)%>" />
					</p>
					<p>
						categoryID <input type="text" id="categoryID" name="categoryID"
							value="<%=RandomStringUtils.randomAlphabetic(10)%>" />
					</p>
					<p>
						pointMemeberID <input type="text" id="pointMemeberID"
							name="pointMemeberID"
							value="<%=RandomStringUtils.randomNumeric(50)%>" />
					</p>
					<p>
						payMethod <input type="text" id="payMethod" name="payMethod"
							value="<%=RandomStringUtils.randomAlphabetic(150)%>" />
					</p>
					<p>
						typeOfCreditCard <input type="text" id="typeOfCreditCard"
							name="typeOfCreditCard" value="1" />
					</p>
					<p>
						cashExpiredDateTime <input type="text" id="cashExpiredDateTime"
							name="cashExpiredDateTime"
							value="<%=RandomStringUtils.randomNumeric(14)%>" />
					</p>
					<p>
						hashValue <input type="text" id="hashValue" name="hashValue"
							value="<%=RandomStringUtils.randomAlphabetic(150)%>" />
					</p>
					<p>
						successURL <input type="text" id="successURL" name="successURL"
							value="<%=RequestUtil.getURLWithContextPath(request)%>/simulate/ec_success" />
					</p>
					<p>
						failURL <input type="text" id="failURL" name="failURL"
							value="<%=RequestUtil.getURLWithContextPath(request)%>/simulate/ec_fail" />
					</p>
					<p>
						cancelURL <input type="text" id="cancelURL" name="cancelURL"
							value="<%=RequestUtil.getURLWithContextPath(request)%>/simulate/ec_cancel" />
					</p>
					<p>
						redirectTime <input type="text" id="redirectTime"
							name="redirectTime"
							value="<%=RandomStringUtils.randomNumeric(3)%>" />
					</p>
					<p>
						enableSkippage <input type="text" id="enableSkippage"
							name="enableSkippage" value="T" />
					</p>
				</td>
			</tr>
			<tr>
				<td align="center"><input type="submit" value="submit" /></td>
			</tr>
		</table>
	</form>
</body>
</html>
